import request from '@/utils/request'

/*
* 获取货物类型分页数据的接口
*  */
export const fetchGoodsTypeListAPI = (params) => {
  return request({
    url: '/manager/goodsType/page',
    method: 'GET',
    params
  })
}

/*
* 删除货物类型的接口
*  */
export const deleteGoodsTypeAPI = (id) => {
  return request({
    url: `/manager/goodsType/${id}`,
    method: 'DELETE'
  })
}

/*
* 添加货物类型的接口
*  */
export const addGoodsTypeAPI = (data) => {
  return request({
    url: '/manager/goodsType',
    method: 'POST',
    data
  })
}

/*
*
*编辑货物类型的接口
*  */
export const editGoodsTypeAPI = (data) => {
  return request({
    url: `/manager/goodsType/${data.id}`,
    method: 'PUT',
    data
  })
}

/*
*
* 获取货物类型详情的接口
*  */
export const fetchGoodsTypeDetailAPI = (id) => {
  return request({
    url: `/manager/goodsType/${id}`,
    method: 'GET'
  })
}
